﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SoundManager : MonoBehaviour 
{
    public static SoundManager instance;

    void Awake()
    {
        instance = this;
    }
    public AudioSource audioSource;


    public void Play(string name)
    {
        audioSource.clip = Resources.Load("Sound/"+name) as AudioClip;

        audioSource.Play();
        Debug.Log("播放声音");
    }


}
